package com.hdoit.ares.web.acc.modelconfig;
import com.hdoit.ares.web.acc.providers.InsuranceTypeProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      yujinhui
 * @email       
 * @createtime  2017年11月28日 19:47:52
 * @comment
 */
public class AwardSettingConfig extends ModelMetadataAttributeConfiguration{
    public AwardSettingConfig(){
        this.setProperty("awardName")
            .hasAttribute(new DisplayNameAttribute("奖项名"))
            .hasAttribute(new RequiredAttribute("奖项名为必填项"));

        this.setProperty("helpCode")
            .hasAttribute(new DisplayNameAttribute("助记码"))
            .hasAttribute(new RequiredAttribute("助记码为必填项"));

        this.setProperty("expression")
            .hasAttribute(new DisplayNameAttribute("利润百分比"))
            .hasAttribute(new RequiredAttribute("利润百分比为必填项"));

        this.setProperty("instruction")
            .hasAttribute(new DisplayNameAttribute("奖项说明"));
        
        this.setProperty("insuranceType")
            .hasAttribute(new DisplayNameAttribute("保险类型"))
            .hasAttribute(new DropDownListAttribute(new InsuranceTypeProvider()));

    }
}
